x86/domain: improvements to switch_native() and switch_compat()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 22 Jan 2015 11:58:47 +0000 (12:58 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 22 Jan 2015 11:58:47 +0000 (12:58 +0100)
commit2e6fc2db9f1231e2ed0ec5263c6aa6ff1db90c5f
treee5871c6411dd2eaf4a1e5abbc290c00f4334fb89
parentee533a31737eabb304461742cd6711b4bc9df365
x86/domain: improvements to switch_native() and switch_compat()

Both are called with known-good domains, making the NULL check redundant.
Both also have open-coded forms of for_each_vcpu() which are replaced.

switch_compat() is updated to propagate the error from set_compat_l4(), rather
than automatically overriding with -ENOMEM.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/domain.c